<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>选择 (OR) |</title>
</head>
<body>
    <script>
        let reg = /html|css|java(Script)?/gi
        let str = 'he is a good man, he knows html, css, and JavaScript'
        console.log(str.match(reg)) //  ['html', 'css', 'JavaScript']
    </script>
</body>
</html>